/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package GUI;

import java.util.Vector;
import javax.swing.AbstractListModel;

/**
 *
 * @author Ronaldo Filho
 */
public class Model extends AbstractListModel {
    
    private Vector<Object> strings;
    
    public Model(Vector<Object> strings)
    {
        this.strings = strings;
    }
          
    public int getSize() {
        return this.strings.size();
    }

    public Object getElementAt(int index) {
        Object o = this.strings.elementAt(index);
        String s = (o.getClass().getSimpleName());
        
        if(s.equals("Vector"))
        {
            return ((Vector<Object>)o).elementAt(0);
        }
        
        else
            return o;
    }
    
    public Vector<Object> getAll()
    {
        return this.strings;
    }
}
